﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using ExitGames.Client.Photon;
using ExitGames.Client.Photon.Lite;
using DICE_GS;

public class EnterRoomSceneManager : MonoBehaviour
{

    private static Queue<Dictionary<byte, object>> packetQueue = new Queue<Dictionary<byte, object>>();

	void Start()
	{
		MyInfo.Instance.SetMyUnitDeckImg();

	}	
    // Update is called once per frame
    void Update()
    {
        while (packetQueue.Count > 0)
        {
            Dictionary<byte, object> tmpPacket = packetQueue.Dequeue();

            switch ((byte)tmpPacket[0])
            {
                default:
                    glog.debug("EnterRoomSceneManager's Packet Handler Unknown Packet Recieved [" + (byte)tmpPacket[0] + "]");
                    break;
            }
        }
    }

    public static bool PacketHandler(Dictionary<byte, object> _packet)
    {
        glog.debug("EnterRoomSceneManager Got Packet");
        if (packetQueue != null)
        {
            packetQueue.Enqueue(_packet);
            return true;
        }

        return false;
    }
}
